<!DOCTYPE html>
<html>
<head>
    <title>Attributes Example</title>
</head>
<body>
    <p>This example only works in Firefox 1.5+.</p>
    <script type="text/javascript;e4x=1">
    
        var employees =  <employees>
                            <employee position="Software Engineer">
                                <name>Nicholas C. Zakas</name>
                            </employee>
                            <employee position="Salesperson">
                                <name>Jim Smith</name>
                            </employee>
                        </employees>;
                        
        alert(employees.employee[0].@position);
        alert(employees.employee[0].child("@position"));
        alert(employees.employee[0].attribute("position"));
        
        employees.employee[0].@name = "manager";
        alert(employees.employee[0].toXMLString());
        
        delete employees.employee[0].@position;
        alert(employees.employee[0].toXMLString());

    </script>
</body>
</html>
